/PROG  PNS0003
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "P0001916";
PROG_SIZE	= 3386;
CREATE		= DATE 22-07-11  TIME 10:31:28;
MODIFIED	= DATE 25-02-25  TIME 21:37:46;
FILE_NAME	= PNS0072;
VERSION		= 0;
LINE_COUNT	= 121;
MEMORY_SIZE	= 3846;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R45 ;
   6:  !  PROGRAM: PNS0003 ;
   7:  !  PART:P0001916  ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.2    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[3] ;
  23:  R[5:SPEED/SuDu]=10    ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  26:J P[2:PICK POUNCE] 50% CNT100 ACC100 BREAK    ;
  27:  PAUSE ;
  28:  R[1:CYCLE TOTAL]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5:SPEED/SuDu] ;
  34:   ;
  35:  TIMER[3]=STOP ;
  36:  TIMER[2]=STOP ;
  37:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  38:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  39:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  40:  R[8:R MOVE TIME]=TIMER[3]    ;
  41:  TIMER[2]=RESET ;
  42:  TIMER[2]=START ;
  43:  TIMER[3]=RESET ;
  44:   ;
  45:  !PROCEED TO PICK ;
  46:  LBL[20] ;
  47:  IF DI[1:P4 PICK ENTRY OK]=ON AND DI[3:FROM R34 CLEAR]=ON AND DI[8:P4 PICK START]=ON,JMP LBL[25] ;
  48:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  49:  JMP LBL[20] ;
  50:   ;
  51:  LBL[25] ;
  52:  WAIT DI[1:P4 PICK ENTRY OK]=ON AND DI[3:FROM R34 CLEAR]=ON AND DI[8:P4 PICK START]=ON    ;
  53:  R[5:SPEED/SuDu]=100    ;
  54:  TIMER[3]=START ;
  55:  OVERRIDE=R[5:SPEED/SuDu] ;
  56:J P[3:PICK APPROACH] 100% CNT100 ACC100    ;
  57:   ;
  58:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100    ;
  59:  PAYLOAD[4] ;
  60:  CALL CHK_PICK    ;
  61:  MONITOR Z_CHECH ;
  62:J P[5:PICK DEPART] 100% CNT75 ACC100 TA R[20]sec,DO[5:TO R34 DROP START]=PULSE,1.0sec    ;
  63:  DO[8:P4 PARTS OUT]=PULSE,1.0sec ;
  64:  LBL[27] ;
  65:  CALL CHECKPICK    ;
  66:  IF DI[9:VACUUM ONL]=OFF OR DI[11:VACUUM ONR]=OFF,JMP LBL[27] ;
  67:   ;
  68:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  69:   ;
  70:  LBL[30:GOTO DROP POUNCE] ;
  71:J P[8:DROP POUNCE] 100% CNT100 ACC100    ;
  72:  TIMER[3]=STOP ;
  73:  LBL[40:AT DROP POUNCE] ;
  74:  IF DI[2:P5 DROP ENTRY]=ON AND DI[4:FROM RU5 CLEAR]=ON AND DI[5:P5 DROP START]=ON,JMP LBL[80] ;
  75:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P5 DROP ENTRY]=ON,JMP LBL[50] ;
  76:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  77:  JMP LBL[40] ;
  78:   ;
  79:  LBL[50:MOVE DROP SNEAK] ;
  80:  TIMER[3]=START ;
  81:  OVERRIDE=R[5:SPEED/SuDu] ;
  82:J P[9:DROP SNEAK] 100% CNT100 ACC100    ;
  83:  LBL[51:DROP OR C-P-S] ;
  84:  IF DI[2:P5 DROP ENTRY]=ON AND DI[4:FROM RU5 CLEAR]=ON AND DI[5:P5 DROP START]=ON,JMP LBL[80] ;
  85:   ;
  86:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  87:  JMP LBL[51] ;
  88:  JMP LBL[50] ;
  89:   ;
  90:  LBL[60:MOVE CLS-PRS-ACC] ;
  91:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  92:  PAUSE ;
  93:  JMP LBL[30] ;
  94:   ;
  95:  LBL[80:DROP ENABLED] ;
  96:  TIMER[3]=START ;
  97:  !PROCEED TO DROP ;
  98:  OVERRIDE=R[5:SPEED/SuDu] ;
  99:J P[10:DROP APPROACH] 100% CNT100 ACC100    ;
 100:  MONITOR END Z_CHECH ;
 101:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC120 BREAK    ;
 102:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
 103:  PAYLOAD[3] ;
 104:   ;
 105:  CALL CHK_DROP    ;
 106:   ;
 107:J P[12:DROP DEPART] 100% CNT100 ACC130 TA   0.00sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 108:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 109:  !GOTO PICK POUNCE ;
 110:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 111:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 112:  JMP LBL[10] ;
 113:   ;
 114:  LBL[90:END OF CYCLE] ;
 115:  TIMER[1]=STOP ;
 116:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 117:  MONITOR END MON_PICK ;
 118:J P[1:MIDDLE] 50% CNT100    ;
 119:  MOVE TO HOME    ;
 120:   ;
 121:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z = -1020.000  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2072.396  mm,	Y =  1576.000  mm,	Z = -1015.360  mm,
	W =   179.322 deg,	P =     1.370 deg,	R =   150.802 deg,
	E1=   134.033 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2625.266  mm,	Y =  3267.332  mm,	Z = -1040.834  mm,
	W =   179.753 deg,	P =     -.114 deg,	R =    90.603 deg,
	E1=   197.062 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2625.266  mm,	Y =  3267.332  mm,	Z = -1161.860  mm,
	W =   179.753 deg,	P =     -.114 deg,	R =    90.603 deg,
	E1=   197.062 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2625.266  mm,	Y =  3267.332  mm,	Z =  -998.274  mm,
	W =   179.753 deg,	P =     -.114 deg,	R =    90.603 deg,
	E1=   197.062 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2078.181  mm,	Y =  1626.722  mm,	Z =  -916.230  mm,
	W =  -179.087 deg,	P =      .263 deg,	R =   144.586 deg,
	E1=   143.645 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2004.640  mm,	Y =  -970.976  mm,	Z =  -925.476  mm,
	W =  -179.760 deg,	P =     -.641 deg,	R =  -155.668 deg,
	E1=    84.148 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2159.458  mm,	Y = -1776.769  mm,	Z =  -936.532  mm,
	W =   179.909 deg,	P =     -.590 deg,	R =  -135.472 deg,
	E1=    64.036 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2638.095  mm,	Y = -3256.734  mm,	Z = -1053.601  mm,
	W =  -179.687 deg,	P =    -2.697 deg,	R =   -89.558 deg,
	E1=    17.320 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2638.093  mm,	Y = -3256.734  mm,	Z = -1169.678  mm,
	W =  -179.687 deg,	P =    -2.697 deg,	R =   -89.559 deg,
	E1=    17.320 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2638.098  mm,	Y = -3256.732  mm,	Z = -1076.080  mm,
	W =  -179.687 deg,	P =    -2.697 deg,	R =   -89.558 deg,
	E1=    17.320 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2108.233  mm,	Y = -1082.620  mm,	Z = -1052.729  mm,
	W =  -179.314 deg,	P =      .232 deg,	R =  -150.634 deg,
	E1=    77.392 deg
};
/END
